package v1

import (
	"github.com/gogf/gf/v2/frame/g"
	"github.com/gogf/gf-demo-user/v2/internal/model/entity"
)
type SigninUserReq struct {
	g.Meta   `path:"/auth/signin/user" method:"post" tags:"Authentication" summary:"用户登录"`
	Email string `v:"required"`
	Password string `v:"required"`
}
type SigninUserRes struct{}

type ForgetReq struct {
	g.Meta `path:"/auth/forget_password" method:"post" tags:"Authentication" summary:"验证身份验证令牌"`
	Email string `v:"required"`
}
type ForgetRes struct {}

type ResetReq struct {
	g.Meta    `path:"/auth/reset_password" method:"post" tags:"Authentication" summary:"重置用户密码"`
	Email  string `v:"required|length:6,16"`
	Password  string `v:"required|length:6,16"`
	Password2 string `v:"required|length:6,16|same:Password"`
}
type ResetRes struct {}

type RegUserReq struct {
	g.Meta    `path:"/auth/register/user" method:"post" tags:"Authentication" summary:"注册一个新用户账户"`
	Email  string `v:"required|length:6,16"`
	Password  string `v:"required|length:6,16"`
	Password2 string `v:"required|length:6,16|same:Password"`
}
type RegUserRes struct{}

type RegCompanyReq struct {
	g.Meta    `path:"/auth/register/company" method:"post" tags:"Authentication" summary:"注册一个新公司账户"`
	Email  string `v:"required|length:6,16"`
	Password  string `v:"required|length:6,16"`
	Password2 string `v:"required|length:6,16|same:Password"`
}
type RegCompanyRes struct{}

type SignOutReq struct {
	g.Meta `path:"/auth/signout" method:"post" tags:"Authentication" summary:"用户登出系统"`
}
type SignOutRes struct{}

type IsSignedInReq struct {
	g.Meta `path:"/auth/validate" method:"post" tags:"Authentication" summary:"验证身份验证令牌"`
}
type IsSignedInRes struct {
	OK bool `dc:"返回True表示登陆; 否则表示未登陆"`
}

type ProfileReq struct {
	g.Meta `path:"/auth/profile" method:"get" tags:"Authentication" summary:"获取当前登陆用户"`
}
type ProfileRes struct {
	*entity.Account
}

type CheckPassportReq struct {
	g.Meta   `path:"/user/check-passport" method:"post" tags:"Authentication" summary:"验证邮箱账号是否存在"`
	Email string `v:"required"`
}
type CheckPassportRes struct{}

